home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 6⁄8⁄90 / 1407-Command not disabled-Jun90 < prev    next >
Encoding:
Text File  |  1990-06-08  |  1.9 KB  |  38 lines  |  [TEXT/GEOL]

  1. Item    7123272                         5-June-90        08:58PDT
  2.  
  3. From:   A.XSE010                        Austria - SLT Labinstruments,IDV
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    Command not disabled on close
  8.  
  9. Using MacApp 2.0ß9 (and lots of remnant direct toolbox calls) and Inside Out
  10. (v. 1.2) through p1 Modula-2 (v. 4.1b2) under MPW 3.0 (haven't got round to
  11. installing 3.1 yet).
  12.  
  13. I have a view class which handles two menu commands (which at this stage do
  14. exactly the same thing).  Whether these commands are enabled or not depends on
  15. there being something selected in the view — if something is selected, they are
  16. enabled, if nothing is selected they are disabled.  The two commands in
  17. question are only referred to in this class's DoSetupMenus and DoMenuCommands
  18. methods (via their command numbers).  Until I realised that I had to flag these
  19. command as disabled in the .r file, the enabling and disabling of the commands
  20. only worked correctly when an instance of the class was active.  It now works
  21. until I close the last window (using the close box — no other method is
  22. provided) containing an instance of the class with something selected in it...
  23. the two commands stay enabled, which they shouldn't.  I can imagine why this
  24. might happen: by the time MacApp gets round to calling DoSetupMenus, the
  25. instance of the view has vanished and so MacApp has no knowledge of the two
  26. commands or of the methods which enable and process them.  If this is the case,
  27. then it would seem to me to be a design flaw in MacApp.  What is the solution?
  28.  
  29. By the way, can it make any difference at all whether I call INHERITED
  30. DoSetupMenus at the end or the beginning of the OVERRIDE (perhaps if I try to
  31. Enable the same command from two event handlers in the command chain)?
  32.  
  33. I am not on the MacApp.Tech$ group address, so could you please send me a
  34. response directly to my AppleLink address.
  35.  
  36. Alex Livingston
  37.  
  38.